-- <nowiki>
local T = require('Module:Tool')

local dictTrans = require('Module:Data/TransDict')

local Trans = {}

function Trans.s(args)
    args = T.parseArgs(args)

    local text = args.text or args[1]

    for hans, hant in pairs(dictTrans) do
        mw.log(text)
        text = string.gsub(text, hans, '-{zh-hans:' .. hans .. ';zh-hant:' .. hant .. '}-')
    end

    return text
end

function Trans.t(args)
    args = T.parseArgs(args)

    local text = args.text or args[1]

    for hans, hant in pairs(dictTrans) do
        text = string.gsub(text, hant, '-{zh-hans:' .. hans .. ';zh-hant:' .. hant .. '}-')
    end

    return text
end

return Trans
-- </nowiki>
-- [[Category:Module]][[Category:Module/Function]]
